#include<iostream>
using namespace std;
		
int main()
{
	double n;
	cin >> n;
	int arr[1010] = { 0 };
	int count = 0;
	while (n>0) {
		double s = 2 * n;
		if (s >= 1) {
			arr[count++] = 1;
			n = s - 1;
		}
		else {
			arr[count++] = 0;
			n = s;
		}
		s *= 2;	
		if (count >= 32) {
			cout << "ERROR" << endl;
			return 0;
		}
	}
	cout << "0.";
	for (int i = count - 1; i >= 0; i--) {
		cout << arr[i];
	}
	return 0;
}